package com.haifeng.jupiter.auth.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.HashSet;
import java.util.Set;

/**
 * <p>
 *  用户返回实体
 * </p>
 *
 * @author: Haifeng
 * @date: 2020-08-16
 */
@Data
@ApiModel
public class UserDto implements Serializable{

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "主键")
    private String id;

    @ApiModelProperty(value = "用户名")
    private String username;

    @ApiModelProperty(value = "密码，加密存储")
    private String password;

    @ApiModelProperty(value = "类型：0-男；1-女")
    private Integer gender;

    @ApiModelProperty(value = "超级管理员：1-超级管理员；0-非超级管理员")
    private Integer superAdmin;

    @ApiModelProperty(value = "手机号")
    private String mobilePhone;

    @ApiModelProperty(value = "微信号")
    private String wechat;

    @ApiModelProperty(value = "邮箱")
    private String email;

    @ApiModelProperty(value = "住址")
    private String address;

    @ApiModelProperty(value = "身份证号")
    private String idCardNo;

    @ApiModelProperty(value = "账户是否过期：0-过期；1-未过期")
    private Boolean accountNonExpired;

    @ApiModelProperty(value = "密码是否过期：0-过期；1-未过期")
    private Boolean credentialsNonExpired;

    @ApiModelProperty(value = "是否锁定：0-锁定；1-未锁定")
    private Boolean accountNonLocked;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "是否可用：0-不可用；1-可用")
    private Boolean enabled;

    @ApiModelProperty(value = "头像")
    private String avatarUrl;

    @ApiModelProperty(value = "是否删除，0-未删除，1-已删除")
    private Integer deleteFlag;

    @ApiModelProperty(value = "版本号")
    private Integer version;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createDatetime;

    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateDatetime;

    @ApiModelProperty(value = "权限集合")
    private Set<PermissionDto> permissionList = new HashSet<>();
}
